package com.util.library.msg;

import com.hethongviet.library.R;

import android.app.Activity;
import android.app.Dialog;
import android.view.Window;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

public class DialogList extends Dialog
{
	private ListView _listView = null;
	private Activity _activity = null;

	public DialogList(Activity activity, String[] listItems)
	{
		super(activity);
		_activity = activity;
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.dialog_list);
		_listView = (ListView) findViewById(R.id.listViewDialog);
		_listView.setAdapter(new ListItemDialogAdapter(_activity, listItems));
		_listView.setTextFilterEnabled(true);		
	}
	
	public void setOnItemClickListener(OnItemClickListener onItemClickListener)
	{
		_listView.setOnItemClickListener(onItemClickListener);
	}
}
